using System.Collections.Generic;
using Source.Web.FrameWork;

namespace Source.Tests.Web
{
    public class TestStateProvider : IStateProvider
    {
        private readonly Dictionary<string, object> state = new Dictionary<string, object>();

        public void Store(string key, object value)
        {
            state[key] = value;
        }

        public T Retrieve<T>(string key) where T : class 
        {
            return (T)state[key];
        }
    }
}